import { Component, Vec2 } from "cc";
import { BattleRoom } from "./BattleRoom";
import { IRecycle } from "../../../framework/pool/Recycle";
import { PropertySet } from "./PropertySet";

export abstract class BattleObj extends Component implements IRecycle{

    id:number
    //配置属性
    cfgProperties:PropertySet = new PropertySet()
    //运行时属性
    runTimeProperties:PropertySet = new PropertySet()
    owner:BattleObj//归属者,比如英雄的召唤物，建筑，怪物等
    //技能列表
    public readonly skillManager = new SkillManager(this);
    //buff列表
    //类型：英雄，怪物，建筑
    //阵营：我方，敌方，中立
    battleRoom:BattleRoom//所在房间
    //移动方向
    public moveDirecion:Vec2 = new Vec2(0,0)
    //移动目标
    target:BattleObj//攻击目标
    



    //每帧调用
    public abstract tick(dt:number):void;

    recycle(): void {
     this.id = 0
     //TODO 各种属性清理   
    }
    public isDie(){
        //TODO 比较血量
        return false
    }
}